/*
 * @Author: CJF
 * @Email: 1757818940@qq.com
 * @Date: 2022-03-01 15:57:30
 * @LastEditTime: 2022-03-01 21:36:00
 * @Description: 详情页接口
 */
import axios from 'axios'

function detailsApi(id){
    return new Promise(resolve=>{
        axios.request({
            method:'GET',
            url:'http://www.xiongmaoyouxuan.com/api/detail',
            params:{id,
                normal: 1,
                sa: '',
                ignore_source_pid:'' }
            
        }).then(({data})=>{
            resolve(data)
        }).catch(e=>{
            console.log('----------------- 请求失败')
            resolve(e)
        })
    })
}
function hotsApi(start){
    return new Promise(resolve=>{
        axios.request({
            method:'GET',
            url:'http://www.xiongmaoyouxuan.com/api/tab/1/feeds',
            params:{
                start,
                sort:0
             }
            
        }).then(({data})=>{
            resolve(data)
        }).catch(e=>{
            console.log('----------------- 请求失败')
            resolve(e)
        })
    })
}
export  {detailsApi,hotsApi}